﻿function WindowModalDialog(url, title, width, height, link) {
    if (title == null)
        title = "窗口";
    var url = "url:" + url;  //要打开的窗口
    height = height;
    $.dialog({
        title: title,
        width: width,
        height: height,
        lock: true,
        content: url,
        link: (link == true ? true : false)
    });
}

function WindowDialog(url, title, width, height, api, winobj) {
    url = "url:" + url;  //要打开的窗口
    if (title == null) {
        title = "新窗口";
    }
    if (width == null) {
        width = 700;
    }
    if (height == null) {
        height = 500;
    }
    if (winobj == null) {
        winobj = window;
    }
    var guid = newCommon.newGuid();
    if (api != undefined) {
        var w = api.opener;
        w.$.dialog({
            id: guid,
            title: title,
            width: width,
            height: height,
            lock: true,
            parent: api,
            content: url,
            data: winobj
        });
    }
    else {
        $.dialog({
            id: guid,
            title: title,
            width: width,
            height: height,
            lock: true,
            content: url,
            data: winobj
        });
    }
}